<template>
    <div class="content">
       <el-dialog title="查看内容" :visible.sync="visible.isShow" size="tiny" >
            <el-form ref="canelLesson" label-width="90px" class="comment-dialog-content">
                 <el-row :gutter="20">
                    <el-col> 
                        <el-form-item label="评论内容：">
                            <span class="comment-content">{{visible.info.commentContent===null?'暂无':visible.info.commentContent}}</span>  
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row :gutter="20">
                    <el-col> 
                        <el-form-item label="回复内容：" prop="replyContent">
                           <span class="comment-content">{{visible.info.replyContent===null?'暂无':visible.info.replyContent}}</span>  
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row type="flex" class="btn-group" justify="center" >
                     <el-col :span="4">
                        <el-button type="primary" @click="submit('canelLesson')">确 定</el-button>
                    </el-col>
                </el-row> 
            </el-form>
        </el-dialog>
    </div>
</template>

<script>
export default {
    props: {
        visible: {
            type: Object,
            default() {
                return {
                    isShow: false, // 默认不显示    
                    info: {}
                }
            }
        }
    },
    data() {
        return {  
        };
    },
    // watch: {
    //     // 监控父组件传来的info对象
    //     ['visible.info'](val) {
    //         console.log('val', val, val.sReplyContent);
    //         this.formInline.replyContent = val.sReplyContent;
    //     },
    //     ['visible.isShow'](val) {
    //         if (!val) this.reset();     
    //     }
    // },
    created() {
        console.log('this.visible.info', this.visible.info)
    },
    methods: {
        // 提交
        submit(formName) {
            this.visible.isShow = false;
        }
        
    }
}
</script>

<style lang="scss" scoped>
.btn-group{
    padding-top: 10px;
}
.comment-content{
    line-height:24px;
    color:#999;
}

</style>
